﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db;
using HengTong.Model._Admin;
using HengTong.Model.Db.System;


namespace HengTong.ViewModel._Admin.SysUserFavoriteVms
{
    public partial class SysUserFavoriteTemplateVm : BaseTemplateVM
    {
        [Display(Name = "绑定用户")]
        public ExcelPropety UserExcel = ExcelPropety.CreateProperty<SysUserFavorite>(x => x.UserId);
        [Display(Name = "菜单ID")]
        public ExcelPropety MenuIdExcel = ExcelPropety.CreateProperty<SysUserFavorite>(x => x.MenuId);
        [Display(Name = "菜单名称")]
        public ExcelPropety MenuNameExcel = ExcelPropety.CreateProperty<SysUserFavorite>(x => x.MenuName);
        [Display(Name = "菜单图标")]
        public ExcelPropety MenuIconExcel = ExcelPropety.CreateProperty<SysUserFavorite>(x => x.MenuIcon);
        [Display(Name = "菜单URL")]
        public ExcelPropety MenuUrlExcel = ExcelPropety.CreateProperty<SysUserFavorite>(x => x.MenuUrl);
        [Display(Name = "排序")]
        public ExcelPropety SortOrderExcel = ExcelPropety.CreateProperty<SysUserFavorite>(x => x.SortOrder);

	    protected override void InitVM()
        {
            UserExcel.DataType = ColumnDataType.ComboBox;
            UserExcel.ListItems = DC.Set<FrameworkUser>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysUserFavoriteImportVm : BaseImportVM<SysUserFavoriteTemplateVm, SysUserFavorite>
    {

    }

}
